home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / devices / parallel.i < prev    next >
Text File  |  1987-03-31  |  5KB  |  140 lines

  1.  
  2. *****************************************************************
  3. *                                                               *
  4. * Copyright 1985, Commodore Amiga Inc.  All rights reserved.    *
  5. * No part of this program may be reproduced, transmitted,       *
  6. * transcribed, stored in retrieval system, or translated into   *
  7. * any language or computer language, in any form or by any      *
  8. * means, electronic, mechanical, magnetic, optical, chemical,   *
  9. * manual or otherwise, without the prior written permission of  *
  10. * Commodore-Amiga Incorporated, 983 University Ave. Building #D,*
  11. * Los Gatos, California, 95030                                  *
  12. *                                                               *
  13. *****************************************************************
  14.  
  15.  
  16. *****************************************************************
  17. *
  18. * parallel.i -- external declarations for Serial Port Driver
  19. *
  20. * SOURCE CONTROL
  21. * ------ -------
  22. * $Header: parallel.i,v 25.0 85/03/27 19:14:15 tomp Exp $
  23. *
  24. * $Locker:  $
  25. *
  26. *****************************************************************
  27.  
  28.     IFND     DEVICES_PARALLEL_I
  29. DEVICES_PARALLEL_I SET 1
  30.  
  31.     IFND     EXEC_STRINGS_I
  32.     include 'exec/strings.i'
  33.     ENDC    !EXEC_STRINGS_I
  34.  
  35.     IFND     EXEC_IO_I
  36.     include 'exec/io.i'
  37.     ENDC    !EXEC_IO_I
  38.  
  39. *--------------------------------------------------------------------
  40. *
  41. * Driver error definitions
  42. *
  43. *--------------------------------------------------------------------
  44.  
  45. ParErr_DevBusy          EQU     1
  46. ParErr_BufTooBig        EQU     2
  47. ParErr_InvParam         EQU     3
  48. ParErr_LineErr          EQU     4
  49. ParErr_NotOpen          EQU     5
  50. ParErr_PortReset        EQU     6
  51. ParErr_InitErr          EQU     7
  52.  
  53. *--------------------------------------------------------------------
  54. *
  55. * Useful constants
  56. *
  57. *--------------------------------------------------------------------
  58. *
  59. PDCMD_QUERY        EQU     CMD_NONSTD 
  60. PDCMD_SETPARAMS    EQU     CMD_NONSTD+1
  61. Par_DEVFINISH      EQU     10        ; number of device comands 
  62. *
  63. *--------------------------------------------------------------------
  64. *
  65. * Driver Specific Commands
  66. *
  67. *--------------------------------------------------------------------
  68.  
  69. *-- PARALLELNAME is a generic macro to get the name of the driver.  This
  70. *-- way if the name is ever changed you will pick up the change
  71. *-- automatically.
  72. *--
  73. *-- Normal usage would be:
  74. *--
  75. *-- internalName:       PARALLELNAME
  76. *--
  77.  
  78. PARALLELNAME:   MACRO
  79.                 STRING  'parallel.device'
  80.                 ENDM
  81.  
  82.         BITDEF  PAR,SHARED,5      ; PARFLAGS non-exclusive access
  83.         BITDEF  PAR,RAD_BOOGIE,3  ;    "     (not yet implemented)
  84.         BITDEF  PAR,EOFMODE,1     ;    "     EOF mode enabled bit
  85.         BITDEF  IOPAR,QUEUED,6    ; IO_FLAGS rqst-queued bit
  86.         BITDEF  IOPAR,ABORT,5     ;    "     rqst-aborted bit
  87.         BITDEF  IOPAR,ACTIVE,4    ;    "     rqst-qued-or-current bit
  88.         BITDEF  IOPT,RWDIR,3      ; IO_STATUS read=0,write=1
  89.         BITDEF  IOPT,PBUSY,2      ;    "     printer in busy toggle
  90.         BITDEF  IOPT,PAPEROUT,1   ;    "     paper out
  91.         BITDEF  IOPT,PSEL,0       ;    "     printer selected
  92. *
  93. *
  94. ************************************************************************
  95.  
  96.  STRUCTURE PTERMARRAY,0
  97.         ULONG    PTERMARRAY_0
  98.         ULONG    PTERMARRAY_1
  99.         LABEL    PTERMARRAY_SIZE
  100.  
  101. *****************************************************************
  102. *  CAUTION !!!  IF YOU ACCESS the parallel.device, you MUST (!!!!) use an
  103. *  IOEXTPAR-sized structure or you may overlay innocent memory, okay ?!   
  104. ***************************************************************** 
  105.   
  106.  STRUCTURE IOEXTPAR,IOSTD_SIZE
  107.  
  108. *     STRUCT   MsgNode
  109. *   0   APTR     Succ
  110. *   4   APTR     Pred
  111. *   8   UBYTE    Type
  112. *   9   UBYTE    Pri
  113. *   A   APTR     Name
  114. *   E   APTR     ReplyPort
  115. *  12   UWORD    MNLength
  116. *     STRUCT   IOExt
  117. *  14   APTR     IO_DEVICE
  118. *  18   APTR     IO_UNIT
  119. *  1C   UWORD    IO_COMMAND
  120. *  1E   UBYTE    IO_FLAGS
  121. *  1F   UBYTE    IO_ERROR
  122. *     STRUCT   IOStdExt
  123. *  20   ULONG    IO_ACTUAL
  124. *  24   ULONG    IO_LENGTH
  125. *  28   APTR     IO_DATA
  126. *  2C   ULONG    IO_OFFSET
  127. *
  128.  
  129. *
  130. *  30
  131.         ULONG   IO_PEXTFLAGS    ; (not used) flag extension area
  132.         UBYTE   IO_PARSTATUS    ; device status (see bit defs above)
  133.         UBYTE   IO_PARFLAGS     ; see PARFLAGS bit definitions above 
  134.         STRUCT  IO_PTERMARRAY,PTERMARRAY_SIZE ; termination char array
  135.         LABEL   IOEXTPar_SIZE
  136.  
  137. ****************************************************************************
  138.  
  139.     ENDC    !DEVICES_PARALLEL_I
  140.